package io.starteos.wallet.utils.eos;

import java.util.Map;

import io.starteos.wallet.utils.eos.bean.Account;
import io.starteos.wallet.utils.eos.bean.Accounts;
import io.starteos.wallet.utils.eos.bean.Block;
import io.starteos.wallet.utils.eos.bean.ChainInfo;
import io.starteos.wallet.utils.eos.bean.Producers;
import io.starteos.wallet.utils.eos.bean.TableRows;
import io.starteos.wallet.utils.eos.bean.TableRowsReq;
import io.starteos.wallet.utils.eos.bean.Transaction;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;

/**
 * 
 * @author espritblock http://eblock.io
 *
 */
public interface RpcService {

	@GET("/v1/chain/get_info")
	Call<ChainInfo> getChainInfo();

	@POST("/v1/chain/get_block")
	Call<Block> getBlock(@Body Map<String, String> requestFields);

	@POST("/v1/chain/get_account")
	Call<Account> getAccount(@Body Map<String, String> requestFields);

	@POST("/v1/chain/push_transaction")
	Call<Transaction> pushTransaction(@Body String request);

	@POST("/v1/chain/get_table_rows")
	Call<TableRows> getTableRows(@Body TableRowsReq request);
	
	@POST("v1/history/get_key_accounts")
	Call<Accounts> getKeyAccounts(@Body Map<String, String> requestFields);
	
	@POST("v1/chain/get_producers")
	Call<Producers> getProducers(@Body Map<String, String> requestFields);
}
